package com.yanfan.ccapicode.dao;

import com.yanfan.ccapicode.dao.base.iservice.IBaseRepository;
import com.yanfan.ccapicode.dao.entity.DeviceMappingDO;
import com.yanfan.ccapicode.enums.ThirdPartyCloudEnum;

import java.util.List;

/**
 * :)
 *
 */
public interface DeviceMappingRepository extends IBaseRepository<DeviceMappingDO> {

    List<DeviceMappingDO> selectByDeviceIds(List<String> deviceIds);

    List<DeviceMappingDO> selectByUserIdAndCloudId(String userId, ThirdPartyCloudEnum cloud);

    List<DeviceMappingDO> selectByDeviceId(String deviceId);

    void updateByDeviceIdAndCloudAndUserId(DeviceMappingDO deviceMappingDO);

    void updateBatchByDeviceIdAndCloudAndUserId(List<DeviceMappingDO> dos);

    void deleteByCloudAndUserId(String userId,ThirdPartyCloudEnum cloud);

}
